package com.itheima.mapper;

import com.itheima.pojo.*;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author 3shy.cn
 * @description SalesMapper
 */

@Mapper
public interface ProductMapper {


    List<Product> page(ProductQueryParam productQueryParam);

    @Insert("insert into product(product_name,description,image,state,price,vendor_id,inventory) values(#{productName},#{description},#{image},#{state},#{price},#{vendorId},#{inventory})")
    void insert(Product product);

    Product selectByPrimaryKey(Integer id);

    void update(Product product);

    void deletByIds(List<Integer> ids);
    @Select("select * from product")
    List<Product> queryProuctList();

    void addNumById(Integer id, Integer num);
}
